package vip.xiaonuo.smzq.modular.lifecycle.service.entity.impl;

import  java.util.List;
import java.util.Map;
import cn.hutool.core.lang.tree.TreeNode;
import cn.hutool.core.lang.tree.TreeUtil;
import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.map.MapUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.stereotype.Service;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import org.springframework.beans.factory.annotation.Autowired;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import vip.xiaonuo.smzq.modular.lifecycle.entity.KclCb01Zh;
import vip.xiaonuo.smzq.modular.lifecycle.mapper.entity.KclCb01ZhMapper;
import vip.xiaonuo.smzq.modular.lifecycle.service.entity.KclCb01ZhService;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
 * <p>
 * 字典表1综合 服务实现类
 * </p>
 *
 * @author 于彦飞
 * @since 2024-03-26
 */
@Service(value = "lifeCycleKclCb01ZhService")
public class KclCb01ZhServiceImpl extends ServiceImpl<KclCb01ZhMapper, KclCb01Zh> implements KclCb01ZhService {
        @Autowired
        private KclCb01ZhMapper kclCb01ZhMapper;



        @Override
        public List<KclCb01Zh>  queryKclCb01ZhList(KclCb01Zh kclCb01Zh){
            List<KclCb01Zh> list = new LambdaQueryChainWrapper<KclCb01Zh>(kclCb01ZhMapper).setEntity(kclCb01Zh)
            .list();
//            DictConvertUtil.convertToDictionaryList(list,null);
            return list;
        }

        @Override
        public IPage<KclCb01Zh> queryKclCb01ZhListPage(KclCb01Zh kclCb01Zh){
            IPage<KclCb01Zh> iPage = new LambdaQueryChainWrapper<KclCb01Zh>(kclCb01ZhMapper).setEntity(kclCb01Zh)
            .page(new Page<>(kclCb01Zh.getCurrentPageNum(),kclCb01Zh.getPageSize()));

            List<KclCb01Zh> records = iPage.getRecords();
//            DictConvertUtil.convertToDictionaryList(records,null);
            iPage.setRecords(records);
            return iPage;
        }


    @Override
    public boolean delKclCb01Zh(String id){
        return this.removeById(id);
    }
    @Override
    public boolean delKclCb01ZhBatch(List<String> ids){
        return this.removeByIds(ids);
    }

}

